<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBoxsTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('boxs', function (Blueprint $table) {
            $table->increments('id');
            $table->string('orderno')->unqiue();     //系统自动生成订单号
            $table->string('name');      //客户名称
            $table->string('address');      //地址
            $table->string('mobile');     //联系方式
            $table->string('state')->default(1);        //盒子当前状态
            $table->string('express_out_company');  //寄出物流公司
            $table->string('express_out_no');  //寄出物流公司
            $table->string('express_in_company');  //寄回物流公司
            $table->string('express_in_no');  //寄回物流公司
            $table->string('creator');  //盒子订单的创建者
            $table->string('keeper')->default(0);   //仓管清点人员
            $table->text('history')->nulable(); //存储历史
            $table->string('total')->default(0);    //盒子总价
            $table->text('remark');     //备注
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('boxs');
    }
}
